<template>
    <div class="download-app" >
      <i class="iconfont icon-phone"></i>
      <span @click="boxShow =!boxShow">下载App</span>
      <div class="box" :class="{show: boxShow}">
        <p>移动端</p>
        <img src="/img/二维码.png">
        <p>扫码下载 高德地图</p>
        <p>高德地图 哪儿都熟</p>
        <div class="closebox" @click="boxShow =!boxShow">×</div>
      </div>
    </div>
</template>

<script setup>
import { ref } from 'vue'

const boxShow = ref(false)

</script>

<style lang="scss" scoped>
  .download-app {
    position: absolute;
    top: 20px;
    right: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: #fff;
    padding: 10px;
    font-size: 13px;
    color: #666;
    span{
      cursor: pointer;
    }
    &:hover {
      color: #aaa;
    }
    .box{
      position: absolute;
      top: 50px;
      right: 0;
      width: 240px;
      height: 200px;
      background: #fff;
      text-align: center;
      pointer-events: none;
      opacity: 0;
      &.show{
        opacity: 1;
        pointer-events: auto;
      }
      p:nth-child(1){
        color: rgb(82, 172, 246);
        font-size: 14px;
        margin-top: 10px;
      }
      P:nth-child(3){
        color: #000;
      }
      p:nth-child(4){
        font-size: 12px;
      }
      img{
        width: 70px;
        margin: 20px 0;
      }
      .closebox{
        position: absolute;
        top: 5px;
        right: 10px;
        z-index: 999;
      }
    }
  }
</style>